#!/usr/bin/env bash
# Copyright (c) 2021 maminjie <maminjie2@huawei.com>
# SPDX-License-Identifier: MulanPSL-2.0

shopt -s expand_aliases

# load dir
# load file
load() {
    for lib in "$@"; do
        if [ -d "$lib" ]; then
            local files=$(find "$lib" -name "*.sh")
            for f in $files; do
                . "$f"
            done
        elif [ -f "$lib" ]; then
            . "$lib"
        fi
    done
}
